import axios from '@/utils/request';
const baseOriginURL = process.env.VUE_APP_BASE_ORIGIN + '/iot_device';

// 获取物模型分类列表
const getModelGroupList = () => {
  return axios.get(baseOriginURL + '/device/getModelGroupList');
};

// 获取物模型列表
const getModelList = params => {
  return axios.get(baseOriginURL + '/device/getModelList', {
    params
  });
};

// 获取设备列表
const getDeviceList = params => {
  return axios.get(baseOriginURL + '/device/getDeviceList', {
    params
  });
};

// 获取物模型变量
const getModelVariable = params => {
  return axios.get(baseOriginURL + '/device/getModelVariable', {
    params
  });
};

// 获取历史数据
const getHistoryDataList = params => {
  return axios.get(baseOriginURL + '/device/getHistoryDataList', {
    params
  });
};

export { getModelGroupList, getModelList, getDeviceList, getModelVariable, getHistoryDataList };
